﻿#pragma once

#include <occmesh/api/coons.h>
#include <occmesh/api/half.h>
#include <occmesh/api/utils.h>

struct HalfMesh
{
    HalfMesh(const std::vector<TopoDS_Shape> &shapes);
    ~HalfMesh();

    void BuildTopo();
    void BuildGeom();
    void BuildCoons();
    void BuildFilling();
    std::vector<TopoDS_Face> BuildResults() const;

  private:
    void BuildWire();
    void BuildEdges();
    void BuildVertices();
    void BuildNormals();
    void BuildPerpTangents();

  private:
    const std::vector<TopoDS_Shape> &m_shapes;
    std::vector<Vertex *> m_vertices;
    std::vector<Edge *> m_edges;
    std::vector<HalfEdge *> m_halfEdges;
    std::vector<Wire *> m_wires;
};